<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">

        <title>Setup session</title>

        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="robots" content="noindex, nofollow">

        <link rel="stylesheet" href="/assets/css/simple.min.css" integrity="sha384-RU21UwWLAoiCR1pUjxpW4YprCd2Pdvbi1kFN8QPxkI3gXdF5GrL+OH5GVg/Mvwa5">
    </head>
    <body>

        <header>
            <h1>Setup session</h1>
        </header>

        <main>
            <form action="submit.php" method="POST">
                <label for="entity" pattern="^.{1,16}$">Entity:</label>
                <input type="text" id="entity" name="entity" required>

                <div id="tunnel-type">
                    Tunnel type:
                    <br>

                    <input type="radio" id="wg-tunnel" name="tunnel_type" value="wireguard" checked>
                    <label for="wg-tunnel">WireGuard (preferred)</label>
                    <br>

                    <input type="radio" id="fastd-tunnel" name="tunnel_type" value="fastd">
                    <label for="fastd-tunnel">fastd</label>
                    <br>

                    <input type="radio" id="openvpn-tunnel" name="tunnel_type" value="openvpn">
                    <label for="openvpn-tunnel">OpenVPN static key</label>
                    <br>

                    <input type="radio" id="gre-tunnel" name="tunnel_type" value="gre">
                    <label for="gre-tunnel">GRE</label>
                    <br>

                    <input type="radio" id="vxlan-tunnel" name="tunnel_type" value="vxlan">
                    <label for="vxlan-tunnel">VXLAN</label>
                    <br>
                </div>

                <details id="setup-wireguard">
                    <summary>WireGuard</summary>

                    <div id="wg-pubkey-area">
                        <label for="wg-pubkey">Public key:</label>
                        <br>
                        <input type="text" id="wg-pubkey" name="wg-pubkey" pattern="^[\w\d\+\/\=]{44}$" placeholder="D+/fffBUJbACsNE7jtt686vQJ44B9xmi5pm9o3SYqG0=">
                    </div>

                    <div id="wg-psk-area">
                        <label for="wg-psk">PSK:</label>
                        <br>
                        <input type="text" id="wg-psk" name="wg-psk" pattern="^[\w\d\+\/\=]{44}$" placeholder="1Iy5UUYrPfq/CgaIfqRX3OMBfCKID/m7M3a2LMM/nAs=">
                    </div>

                    <div id="wg-endpoint-area">
                        <label for="wg-endpoint">Endpoint: (Leave empty for no endpoint)</label>
                        <br>
                        <input type="text" id="wg-endpoint" name="wg-endpoint" placeholder="crxn.example.com:40008">
                    </div>

                    <div id="wg-keepalive-area">
                        <label for="wg-keepalive">Keepalive: (Leave empty for no keepalive)</label>
                        <br>
                        <input type="text" id="wg-keepalive" name="wg-keepalive" pattern="^\d{0,3}$" placeholder="25">
                    </div>
                </details>

                <details id="setup-fastd">
                    <summary>fastd</summary>
                    <div id="fastd-mode-area">
                        Mode:
                        <br>

                        <input type="radio" id="fastd-mode-tun" name="fastd-mode" value="tun" checked>
                        <label for="fastd-mode-tun">TUN (layer 3, preferred)</label>
                        <br>

                        <input type="radio" id="fastd-mode-tap" name="fastd-mode" value="tap">
                        <label for="fastd-mode-tap">TAP (layer 2)</label>
                    </div>
                    <div id="fastd-method-area">
                        Method:
                        <br>

                        <input type="radio" id="fastd-method-enc" name="fastd-method" value="enc" checked>
                        <label for="fastd-method-enc">Encrypted (preferred)</label>
                        <br>

                        <input type="radio" id="fastd-method-aut" name="fastd-method" value="aut">
                        <label for="fastd-method-aut">Authenticated-only (<code>null+[...]</code>)</label>
                        <br>

                        <input type="radio" id="fastd-method-without" name="fastd-method" value="without-security">
                        <label for="fastd-method-without">without security (<code>null@l2tp</code>)</label>
                    </div>
                    <div id="fastd-connection-over-area">
                        Connection over:
                        <br>

                        <input type="radio" id="fastd-connection-over-ipv6" name="fastd-connection-over" value="ipv6" checked disabled>
                        <label for="fastd-connection-over-ipv6">IPv6</label>
                    </div>
                    <div id="fastd-pubkey-area">
                        <label for="fastd-pubkey">Public key:</label>
                        <br>
                        <input type="text" id="fastd-pubkey" name="fastd-pubkey" placeholder="3c49739cb33465ef721739336ade09eb49c8724842f34c538b5d6f0610236e9a">
                    </div>
                    <div id="fastd-endpoint-area">
                        <label for="fastd-endpoint">Endpoint:</label>
                        <br>
                        <input type="text" id="fastd-endpoint" name="fastd-endpoint" placeholder="crxn.example.com:40008">
                    </div>
                </details>

                <details id="setup-openvpn">
                    <summary>OpenVPN</summary>
                    <div id="openvpn-mode">
                        Mode:
                        <br>

                        <input type="radio" id="openvpn-mode" name="openvpn-mode" value="p2p" checked disabled>
                        <label for="openvpn-mode">P2P</label>
                    </div>
                    <div id="openvpn-proto">
                        Protocol:
                        <br>

                        <input type="radio" id="openvpn-proto" name="openvpn-proto" value="udp6" checked disabled>
                        <label for="openvpn-proto">UDP6</label>
                    </div>
                    <div id="openvpn-cipher-area">
                        Cipher:
                        <br>

                        <input type="radio" id="openvpn-cipher" name="openvpn-cipher" value="aes-256-cbc" checked disabled>
                        <label for="openvpn-cipher">AES-256-CBC</label>
                    </div>
                    <div id="openvpn-endpoint-area">
                        <label for="openvpn-endpoint">Endpoint: (Leave blank for non-public peers)</label>
                        <br>
                        <input type="text" id="openvpn-endpoint" name="openvpn-endpoint" placeholder="crxn.example.com">
                    </div>
                    <div id="openvpn-port-area">
                        <label for="openvpn-port">Port: (Leave blank for non-public peers)</label>
                        <br>
                        <input type="text" id="openvpn-port" name="openvpn-port" pattern="^\d{1,5}$" placeholder="40008">
                    </div>
                    <div id="openvpn-keepalive-area">
                        <label for="openvpn-keepalive">Keepalive: (Leave blank for public peers)</label>
                        <br>
                        <input type="text" id="openvpn-keepalive" name="openvpn-keepalive" pattern="^\d{0,3}$" placeholder="20">
                    </div>
                    <div id="openvpn-keepalive-to-area">
                        <label for="openvpn-keepalive-to">Keepalive timeout: (Leave blank for public peers)</label>
                        <br>
                        <input type="text" id="openvpn-keepalive-to" name="openvpn-keepalive-to" pattern="^\d{0,3}$" placeholder="120">
                    </div>
                </details>

                <details id="setup-gre">
                    <summary>GRE</summary>
                    <div id="gre-remote-area">
                        <label for="gre-endpoint">Endpoint:</label>
                        <br>
                        <input type="text" id="gre-endpoint" name="gre-endpoint" placeholder="192.168.56.12">
                    </div>
                    <div id="gre-ttl-area">
                        <label for="gre-ttl">TTL:</label>
                        <br>
                        <input type="text" id="gre-ttl" name="gre-ttl" value="255" disabled>
                    </div>
                    <div id="gre-fou">
                        FOU:
                        <br>

                        <input type="radio" id="gre-fou-none" name="gre-fou" value="none" checked>
                        <label for="gre-fou-none">None (preferred)</label>
                        <br>

                        <input type="radio" id="gre-fou-fou" name="gre-fou" value="none">
                        <label for="gre-fou-fou">FOU</label>
                        <br>

                        <input type="radio" id="gre-fou-gue" name="gre-fou" value="none">
                        <label for="gre-fou-gue">GUE</label>
                        <br>
                    </div>
                    <div id="gre-fou-port">
                        <label for="gre-fou-port">FOU port: (Leave blank with no FOU)</label>
                        <br>
                        <input type="text" id="gre-fou-port" name="gre-fou-port" pattern="^\d{1,5}$" placeholder="40008">
                    </div>
                </details>

                <details id="setup-vxlan">
                    <summary>VXLAN</summary>
                    <div id="vxlan-endpoint">
                        <label for="vxlan-endpoint">Endpoint:</label>
                        <br>
                        <input type="text" id="vxlan-endpoint" name="vxlan-endpoint" placeholder="crxn.example.com">
                    </div>
                    <div id="vxlan-port">
                        <label for="vxlan-port">VXLAN port:</label>
                        <br>

                        <input type="radio" id="vxlan-port-4" name="vxlan-port" value="4789" checked>
                        <label for="vxlan-port-4">4789 (preferred)</label>
                        <br>

                        <input type="radio" id="vxlan-port-8" name="vxlan-port" value="8472">
                        <label for="vxlan-port-8">8472</label>
                    </div>
                    <div id="vxlan-vni">
                        <label for="vxlan-vni">VNI:</label>
                        <br>
                        <input type="text" id="vxlan-vni" name="vxlan-vni" pattern="^\d{1,8}$" placeholder="244632">
                    </div>
                </details>

                <label for="ipv6-ll">Your IPv6 link-local:</label>
                <br>
                <input type="text" id="ipv6-ll" name="ipv6-ll" placeholder="fe80::1" pattern="^fe80:(:[0-9a-fA-F]{0,4}){0,4}$" required>
                <br>

                <label for="email">Your E-Mail:</label>
                <br>
                <input type="email" id="email" name="email" placeholder="contact@example.com" required>
                <br>

                <label for="website">Your website: (Leave blank if you don't have a website or don't want me to link to it)</label>
                <br>
                <input type="text" id="website" name="website" placeholder="crxn.example.com">
                <br>

                <label for="location">Where is your server located?</label>
                <br>
                <input type="text" id="location" name="location" placeholder="Germany" required>
                <br>

                <label for="comments">Additional comments:</label>
                <br>
                <textarea id="comments" name="comments"></textarea>

                <div id="captcha-area">
                    <label for="captcha">What is the answer to everything? (Note: You can look it up on the internet.)</label>
                    <br>
                    <input type="text" id="captcha" name="captcha" required>
                    <br>
                </div>

                <input type="hidden" name="request" value="true"> 
                <input type="submit">
            </form>

        </main>
    </body>
</html>
